﻿using System;

namespace Model
{
    public class TestItemInfo
    {
        public TestItemInfo() { }

        public TestItemInfo(string testItemName)
        {
            this.TestItemName = testItemName;
        }

        public TestItemInfo(Guid testItemID, string testItemName, string productSN, DateTime testTime, int testTypeID, decimal startF, decimal stopF, decimal max, decimal min, decimal highSpec, decimal lowSpec, string isPass,string testTypeName) 
        {
            this.TestItemID = testItemID;
            this.TestItemName = testItemName;
            this.ProductSN = productSN;
            this.TestTime = testTime;
            this.TestTypeID = testTypeID;
            this.StartF = startF;
            this.StopF = stopF;
            this.Max = max;
            this.Min = min;
            this.HighSpec = highSpec;
            this.LowSpec = lowSpec;
            this.IsPass = isPass;
            this.TestTypeName = testTypeName;
        }

        public TestItemInfo(string testItemName, string productSN, DateTime testTime, int testTypeID, decimal startF, decimal stopF, decimal max, decimal min, decimal highSpec, decimal lowSpec, string isPass, string testTypeName)
        {
            this.TestItemName = testItemName;
            this.ProductSN = productSN;
            this.TestTime = testTime;
            this.TestTypeID = testTypeID;
            this.StartF = startF;
            this.StopF = stopF;
            this.Max = max;
            this.Min = min;
            this.HighSpec = highSpec;
            this.LowSpec = lowSpec;
            this.IsPass = isPass;
            this.TestTypeName = testTypeName;
        }

        /// <summary>
        /// 用于射频电性能测试数据录入的Web Service
        /// </summary>
        public TestItemInfo(string testItemName, int testTypeID, decimal startF, decimal stopF, decimal max, decimal min, decimal highSpec, decimal lowSpec, string isPass, string testTypeName)
        {
            this.TestItemName = testItemName;
            this.TestTypeID = testTypeID;
            this.StartF = startF;
            this.StopF = stopF;
            this.Max = max;
            this.Min = min;
            this.HighSpec = highSpec;
            this.LowSpec = lowSpec;
            this.IsPass = isPass;
            this.TestTypeName = testTypeName;
        }

        public Guid TestItemID { get; set; }
        public string TestItemName { get; set; }
        public string ProductSN { get; set; }
        public DateTime TestTime { get; set; }
        public int TestTypeID { get; set; }
        public decimal StartF { get; set; }
        public decimal StopF { get; set; }
        public decimal Max { get; set; }
        public decimal Min { get; set; }
        public decimal HighSpec { get; set; }
        public decimal LowSpec { get; set; }
        public string IsPass { get; set; }
        public string TestTypeName { get; set; }
    }

    /// <summary>
    /// 20150525
    /// 此模型包含测试详细信息+测试记录信息+调试人员信息
    /// 用于质量部通过不良项分析产品调试因素
    /// </summary>
    public class TestAndItemInfo : TestItemInfo
    {
        public TestAndItemInfo() { }

        public TestAndItemInfo(string productTypeID, string userID, string eNAID, string debugDCUserID, string debugUserID, string configVersion,
            string testItemName, string productSN, DateTime testTime, int testTypeID, decimal startF, decimal stopF, decimal max, decimal min, decimal highSpec, decimal lowSpec, string isPass, string testTypeName)
        {
            this.ProductTypeID = productTypeID;
            this.UserID = userID;
            this.ENAID = eNAID;
            this.DebugDCUserID = debugDCUserID;
            this.DebugUserID = debugUserID;
            this.ConfigVersion = configVersion;
            base.TestItemName = testItemName;
            base.ProductSN = productSN;
            base.TestTime = testTime;
            base.TestTypeID = testTypeID;
            base.StartF = startF;
            base.StopF = stopF;
            base.Max = max;
            base.Min = min;
            base.HighSpec = highSpec;
            base.LowSpec = lowSpec;
            base.IsPass = isPass;
            base.TestTypeName = testTypeName;
        }

        public string ProductTypeID { get; set; }
        public string UserID { get; set; }
        public string ENAID { get; set; }
        public string DebugDCUserID { get; set; }
        public string DebugUserID { get; set; }
        public string ConfigVersion { get; set; }
    }

    /// <summary>
    /// 20160718
    /// 此模型包含高频测试详细信息+高频测试记录信息
    /// 用于质量部检索导出高频不良项
    /// </summary>
    public class HighFTestAndItemInfo : TestItemInfo
    {
        public HighFTestAndItemInfo() { }

        public HighFTestAndItemInfo(string productTypeID, string userID, string eNAID, string testItemName, string productSN, DateTime testTime, 
            int testTypeID, decimal startF, decimal stopF, decimal max, decimal min, decimal highSpec, decimal lowSpec, string isPass, string testTypeName)
        {
            this.ProductTypeID = productTypeID;
            this.UserID = userID;
            this.ENAID = eNAID;
            base.TestItemName = testItemName;
            base.ProductSN = productSN;
            base.TestTime = testTime;
            base.TestTypeID = testTypeID;
            base.StartF = startF;
            base.StopF = stopF;
            base.Max = max;
            base.Min = min;
            base.HighSpec = highSpec;
            base.LowSpec = lowSpec;
            base.IsPass = isPass;
            base.TestTypeName = testTypeName;
        }

        public string ProductTypeID { get; set; }
        public string UserID { get; set; }
        public string ENAID { get; set; }
    }
}
